<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
    <ul id="list"></ul>
    <script>
        var arr = [{
                name: '小明',
                age: 12,
                sex: 'f',
            },
            {
                name: '小红',
                age: 11,
                sex: 'm',
            },
            {
                name: '小强',
                age: 13,
                sex: 'f',
            },
        ]

        let list = document.querySelector('#list')

        for (let index = 0; index < arr.length; index++) {
            list.innerHTML += [
                '<li>',
                '  <div class="info">',
                '    <p>姓名：' + arr[index].name + '</p>',
                '    <p>年龄：' + arr[index].age + '</p>',
                '    <p>性别：' + arr[index].sex + '</p>',
                '  </div>',
                '</li>',
            ].join('')
        }
    </script>
</body>

</html>